function radarCharts(id) {
  const chartDom = document.getElementById(`${id}`);
  const myChart = echarts.init(chartDom);
  option = {
    color: ["rgba(0,183,238, 1)", "rgba(86,199,60, 1)"],
    tooltip: {
      show: true,
      trigger: "item",
    },

    radar: {
      center: ["35%", "50%"],
      radius: "70%",
      startAngle: 90,
      splitNumber: 4,
      shape: "circle",
      splitArea: {
        areaStyle: {
          color: ["transparent"],
        },
      },
      axisLabel: {
        show: false,
        fontSize: 20,
        color: "#fff",
        fontStyle: "normal",
        fontWeight: "normal",
      },
      axisLine: {
        show: false,
        lineStyle: {
          type: "solid",
          color: "#ccc",
        },
      },
      splitLine: {
        show: true,
        lineStyle: {
          type: "dashed",
          color: "#00345e",
        },
      },
      indicator: [
        {
          name: "Co2浓度",
          max: 88,
        },
        {
          name: "湿度",
          max: 88,
        },
        {
          name: "温度",
          max: 88,
        },
        {
          name: "风机",
          max: 88,
        },
        {
          name: "风速",
          max: 88,
        },
        {
          name: "前窗开关",
          max: 88,
        },
      ],
    },
    series: [
      {
        name: "指标分析：",
        type: "radar",
        symbol: "circle",
        symbolSize: 2,
        areaStyle: {
          normal: {
            color: "rgba(255,31,31, 0.8)",
          },
        },
        itemStyle: {
          color: "rgba(86,199,60, 1)",
          borderColor: "#004d8b",
          borderWidth: 2,
        },
        lineStyle: {
          normal: {
            color: "#004d8b",
            width: 2,
          },
        },
        data: [[80, 50, 55, 80, 50, 80]],
      },
    ],
  };

  option && myChart.setOption(option);
  window.addEventListener("resize", function () {
    myChart.resize();
  });
}
